﻿namespace Softserve.Pottery.Manufacturing.Domains
{
    using System;
    using System.Data.Services.Common;
    using System.Runtime.Serialization;
    using Softserve.Pottery.Infrastructure;

    /// <summary>
    /// Contains info about material domain
    /// </summary>
    [DataContract]
    [DataServiceEntity]
    public class Material : IValidatable
    {
        public Material() { }

        #region Properties
        /// <summary>
        /// Material ID
        /// </summary>
        [DataMember]
        public int Id
        {
            get { return m_Id; }
            set { m_Id = value; }
        }

        /// <summary>
        /// Material name
        /// </summary>
        [DataMember]
        public string Name
        {
            get { return m_Name; }
            set { m_Name = value; }
        }

        /// <summary>
        /// Price of one portion of material
        /// </summary>
        [DataMember]
        public double Price
        {
            get { return m_Price; }
            set { m_Price = value; }
        }
        #endregion

        #region Methods

        public bool Validate()
        {
            return true;
        }

        #endregion

        #region Private members

        private int m_Id = default(int);

        private string m_Name = String.Empty;

        private double m_Price = default(double);

        #endregion
    }
}
